﻿using ZSoft.PushServices.Net.Transport;
using ZSoft.PushServices.Net.Transport.ConnectionEvents;
using ZSoft.PushServices.Server.Infra.Events;

namespace ZSoft.PushServices.Server.Infra.App_Start
{
    public class InMemoryConnectionManagerHandlerReistration : IEventHandler
    {
        public AppEventType EventType
        {
            get
            {
                return AppEventType.Application_Start;
            }
        }

        public void Execute()
        {
            ConnectionEventManager.RegisterHandler(new InMemoryConnectionManager.ConnectedHandler());
            ConnectionEventManager.RegisterHandler(new InMemoryConnectionManager.DisconnectedHandler());
            ConnectionEventManager.RegisterHandler(new InMemoryConnectionManager.ReconnectedHandler());
            ConnectionEventManager.RegisterHandler(new InMemoryConnectionManager.IdentifiedHandler());
        }
    }
}